LEADTOOLS (Leadtools assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
DitherLine(Byte[],Int32,Byte[],Int32) Method
See Also 
Leadtools Namespace > RasterImage Class > DitherLine Method : DitherLine(Byte[],Int32,Byte[],Int32) Method



srcBuffer
The input buffer.
srcBufferOffset
Index to srcBuffer where the source data is started.
destBuffer
The output buffer.
destBufferOffset
Index to destBuffer where the destination data is started.
srcBuffer
The input buffer.
srcBufferOffset
Index to srcBuffer where the source data is started.
destBuffer
The output buffer.
destBufferOffset
Index to destBuffer where the destination data is started.
Used in a loop, dithers the line in a specified input buffer, and writes it to an output buffer. Supported in Silverlight, Windows Phone 7

Syntax

Visual Basic (Declaration) 
Overloads Public Sub DitherLine( _
   ByVal srcBuffer() As Byte, _
   ByVal srcBufferOffset As Integer, _
   ByVal destBuffer() As Byte, _
   ByVal destBufferOffset As Integer _
) 
Visual Basic (Usage)Copy Code
Dim instance As RasterImage
Dim srcBuffer() As Byte
Dim srcBufferOffset As Integer
Dim destBuffer() As Byte
Dim destBufferOffset As Integer
 
instance.DitherLine(srcBuffer, srcBufferOffset, destBuffer, destBufferOffset)
C# 
public void DitherLine( 
   byte[] srcBuffer,
   int srcBufferOffset,
   byte[] destBuffer,
   int destBufferOffset
)
C++/CLI 
public:
void DitherLine( 
   array<byte>^ srcBuffer,
   int srcBufferOffset,
   array<byte>^ destBuffer,
   int destBufferOffset
) 

Parameters

srcBuffer
The input buffer.
srcBufferOffset
Index to srcBuffer where the source data is started.
destBuffer
The output buffer.
destBufferOffset
Index to destBuffer where the destination data is started.

Example

For an example, refer to StartDithering.

Remarks

This method uses the dithering method specified in the DitheringMethod property. Therefore, it provides better 4- or 8-bit output than the RasterBufferConverter.Convert method.

This method uses the palette that the StartDithering method specifies. The output of the DitherLine(Byte[],Int32,Byte[],Int32) method is made up of 1-, 4-, or 8-bit indexes to the specified palette. StopDithering cleans up the allocated variables and buffers. For a description of how the methods relate to each other, refer to the StartDithering.

This method does not support signed images.

For more information, refer to Introduction to Image Processing With LEADTOOLS.

Requirements

Target Platforms: Silverlight, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only), Windows Phone 7

See Also